package user;
import book.Book;
import book.HiredBook;
import java.util.Arrays;
import operation.*;
import book.*;

public class Reader extends User implements IBorrowable{
    private HiredBookList hiredBookList;
    public Reader(String name, String num, String code) {
        super(name, num, code);
        super.operations = new IOperation[]{
                new Exit(),
                new PrintBook(),
                new FindBook(),
                new BorrowBook(this),
                new ReturnBook(this)
        };
        hiredBookList = new HiredBookList();
    }
    public void menu() {
        System.out.println("0.退出");
        System.out.println("1.所有图书");
        System.out.println("2.查找图书");
        System.out.println("3.借阅图书");
        System.out.println("4.归还图书");
        System.out.println("请输入你的操作");
    }
    public void borrow(Book book) {
        book.setIsHired(true);
        hiredBookList.setNewBook(book);
    }
    public void returnBook(Book book) {

    }
}
